package pl.edu.agh.to1.dice.logic;

import java.util.Comparator;
import java.lang.Integer;

public class RankingEntryComparator implements Comparator<RankingEntry>{
	public int compare(RankingEntry entry1, RankingEntry entry2){
		if(entry1 == null || entry2 == null)
			throw new ClassCastException();
		return Integer.compare(entry1.getSum(),entry2.getSum()); 
	}

	public boolean equals(Object obj){
		if(obj == null){
			return false;
		}
		if(obj instanceof RankingEntryComparator){
			return true;
		}
		else{ 
			return false;
		}
	}
}
